%hgmm12 = hgmm_train(Xdata, ydata, get_manner_phoneme_clustering(), 2, 1);
%hgmm24 = hgmm_train(Xdata, ydata, get_manner_phoneme_clustering(), 4, 2);
%hgmm36 = hgmm_train(Xdata, ydata, get_manner_phoneme_clustering(), 6, 3);

%hierarchies = cell(3, 1);
%hierarchies{1} = hgmm12;
%hierarchies{2} = hgmm24;
%hierarchies{3} = hgmm36;

weights = [0, 0.05, 0.1, 0.2, 0.4, 0.6, 0.8, 1, 1.5, 2];

hgmm_dev_error = zeros(3, 10);
hgmm_test_error = zeros(3, 10);

for i = 1 : 3
    for j = 1 : 10
        hgmm_dev_error(i, j) = calc_error(hgmm_classify(Xdev_all{1}, hierarchies{i}, weights(j)), ydev);
        hgmm_test_error(i, j) = calc_error(hgmm_classify(Xtest_all{1}, hierarchies{i}, weights(j)), ytest);
    end
end